import { ConfigProvider } from 'antd'
import { HashRouter, Switch } from 'react-router-dom'
import { Provider } from 'react-redux'
import zhCN from 'antd/lib/locale/zh_CN'
import { firstRouter, renderRoutes } from '@/router/routerList'
import { store } from '@/redux'
import '@/main/main.less'
import moment from 'moment'
import 'moment/locale/zh-cn'

moment.locale('zh-cn')

export default function App() {
  return (
    <ConfigProvider locale={zhCN}>
      <Provider store={store}>
        <HashRouter>
          <Switch>{renderRoutes(firstRouter, [0])}</Switch>
        </HashRouter>
      </Provider>
    </ConfigProvider>
  )
}
